set(TARGET_NAME WindowsSystem)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

file(GLOB HEADERS CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
file(GLOB SOURCES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)

qt_add_library(${TARGET_NAME} STATIC
    ${HEADERS}
    ${SOURCES}
)

source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${HEADERS} ${SOURCES})

target_include_directories(${TARGET_NAME} PRIVATE ${HEADERS})
target_sources(${TARGET_NAME} PRIVATE ${SOURCES})

find_package(Qt6
    COMPONENTS
        Core
        Widgets
        Gui
)

target_link_libraries(${TARGET_NAME}
    PUBLIC
        Qt6::Gui
        Qt6::Core
        Qt6::Widgets
)

target_include_directories(${TARGET_NAME} 
    PUBLIC 
        ${ROOT_DIR}/WindowsSystem
)

